from flask import Blueprint,jsonify,request
from flask_restful import Api,Resource
from settings.dataM import get_data
from settings.mysqlM import db
import time


user=Blueprint('userdp',__name__)
api=Api(user)


class UserM(Resource):
    def get(self):
        sql="select * from user"
        time.sleep(1)
        res=db.find_all(sql)
        return jsonify({'code':200,'list':res})
    def post(self):
        pass


api.add_resource(UserM,'/user')